<template>
<div style="margin-top: 10%">
  <el-table
      :data="users"
      stripe
      style="width: 100%">
    <el-table-column
        prop="id"
        label="序号">
    </el-table-column>
    <el-table-column
        prop="username"
        label="用户名">
    </el-table-column>
    <el-table-column
        prop="rafflenum"
        label="抽奖次数">
    </el-table-column>
      <el-table-column
          prop="rewardnum"
          label="中奖次数">
      </el-table-column>
    <el-table-column
        prop="ctime"
        label="创建时间">
    </el-table-column>
  </el-table>
</div>
</template>

<script setup>
import {ref,onMounted} from "vue";
import axios from "axios";

const users=new ref([])
onMounted(()=>{
  //请求接口
  axios.get("user/list").then(res=>{
    users.value=res.data.data;
  })
})
</script>

<style scoped>

</style>
